package com.gofunbuy.core;

import java.io.Serializable;

import android.graphics.drawable.Drawable;

public class ProductEntity implements Serializable {
	/*<XML>
    <sort name="餐饮热点" id="12" >
        <p id="12" name="高爾夫球空氣淨化機" dep="具空氣淨化及防電磁輻射雙重功能" img="完整路径/xxx.jpg" oldprice="6980" price="6200" video="完整路径/xxx.mp4" isnew="yes" jp="6980" getpoint="350" shop="Gainberg" shopid="12" code="PH1305013" have="yes" />
    </sort>
    </XML>*/
	/*id : 产品ID
	name : 产品标题
	dep : 产品简短介绍，一行字
	img : 产品图片
	oldprice : 原价，如果没有就留空
	price : 价格
	video : 视频介绍，如果没有就留空
	isnew : 是否为新品，yes or no
	jp : 需要多少积分购买
	getpoint : 获赠多少积分
	shop : 所属店铺名
	shopid : 所属店铺ID
	code : 编号
	have : 是否有库存
	donation*/
	private String classId;
	private String className;
	private String id ;
	private String name;
	private String imgUri;
	private Drawable img;
	private String dep;
	private String oldPrice;
	private String price;
	private String video;
	private String isNew;
	private String jp;
	private String getPoint;
	private String shop;
	private String shopId;
	private String code;
	private String have;
	private String donation;
	
	public ProductEntity(){
		
	}

	public String getDonation() {
		return donation;
	}

	public void setDonation(String donation) {
		this.donation = donation;
	}

	public String getClassId() {
		return classId;
	}

	public void setClassId(String classId) {
		this.classId = classId;
	}

	public String getClassName() {
		return className;
	}

	public void setClassName(String className) {
		this.className = className;
	}

	public String getHave() {
		return have;
	}
	public void setHave(String have) {
		this.have = have;;
	}

	public String getImgUri() {
		return imgUri;
	}

	public void setImgUri(String imgUri) {
		this.imgUri = imgUri;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Drawable getImg() {
		return img;
	}

	public void setImg(Drawable img) {
		this.img = img;
	}

	public String getDep() {
		return dep;
	}

	public void setDep(String dep) {
		this.dep = dep;
	}

	public String getOldPrice() {
		return oldPrice;
	}

	public void setOldPrice(String oldPrice) {
		this.oldPrice = oldPrice;
	}

	public String getPrice() {
		return price;
	}

	public void setPrice(String price) {
		this.price = price;
	}

	public String getVideo() {
		return video;
	}

	public void setVideo(String video) {
		this.video = video;
	}

	public String getIsNew() {
		return isNew;
	}

	public void setIsNew(String isNew) {
		this.isNew = isNew;
	}

	public String getJp() {
		return jp;
	}

	public void setJp(String jp) {
		this.jp = jp;
	}

	public String getGetPoint() {
		return getPoint;
	}

	public void setGetPoint(String getPoint) {
		this.getPoint = getPoint;
	}

	public String getShop() {
		return shop;
	}

	public void setShop(String shop) {
		this.shop = shop;
	}

	public String getShopId() {
		return shopId;
	}

	public void setShopId(String shopId) {
		this.shopId = shopId;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	@Override
	public boolean equals(Object o) {
		// TODO Auto-generated method stub
		ProductEntity p = (ProductEntity)o;
		if(p.name.equals(this.name)&&p.id.equals(this.id)&&p.classId.equals(this.classId)){
			return true;
		}
		return false;
	}
	
}
